<template>
  <view class="container">
    <view class="top-bar"></view>
    <view v-if="loginState" class="user-panel-img">
      <open-data type="userAvatarUrl"></open-data>
    </view>
    <view v-else class="user-panel-img">
      <image src="/static/me/avatar-unauth.svg"></image>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        loginState: false
      }
    },
    onLoad() {},
    onShow() {
      console.log("onShow")
      this.loginState = uni.getStorageSync('loginState')
    },
    methods: {}
  }
</script>

<style>
  .user-panel-img {
    width: 112rpx;
    height: 112rpx;
    border-radius: 50%;
    padding: 0rpx;
    background-color: #fff;
    overflow: hidden;
    margin-right: 24rpx;
  }
</style>
